package org.achao.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.achao.mapper.MybatisPlusDemoMapper;
import org.achao.pojo.MybatisPlusDemo;
import org.achao.service.MybatisPlusDemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author achao
* @description 针对表【mybatis_plus_demo】的数据库操作Service实现
* @createDate 2023-09-23 16:29:10
*/
@Service
public class MybatisPlusDemoServiceImpl extends ServiceImpl<MybatisPlusDemoMapper, MybatisPlusDemo>
    implements MybatisPlusDemoService{

    @Autowired
    private MybatisPlusDemoMapper mybatisPlusDemoMapper;

    @Override
    public List<MybatisPlusDemo> mySelectAll() {
        return mybatisPlusDemoMapper.mySelectAll();
    }

    @Override
    public Integer myInsert(MybatisPlusDemo mybatisPlusDemo) {
        return mybatisPlusDemoMapper.myInsert(mybatisPlusDemo);
    }

    @Override
    public Integer myUpdate(MybatisPlusDemo mybatisPlusDemo) {
        return mybatisPlusDemoMapper.myUpdate(mybatisPlusDemo);
    }

    @Override
    public Integer delete(Long id) {
        return mybatisPlusDemoMapper.deleteById(id);
    }

    @Override
    public MybatisPlusDemo mySelectById(Long id) {
        return mybatisPlusDemoMapper.selectById(id);
    }

    @Override
    public void deleteAll() {
        mybatisPlusDemoMapper.deleteAll();
    }
}




